package io;

import java.io.FileOutputStream;
import java.io.IOException;

public class FOSDemo_1 {
    public static void main(String[] args) throws IOException {
        /*
            文件流的常用构造方法
            FileOutputStream(String path)
            FileOutputStream(file file)
         */
        FileOutputStream fos = new FileOutputStream("./fos.dat");
        /*
            void write(int d)
         */
        fos.write(2);

        System.out.println("写出完毕！");

        fos.close();
    }
}
